﻿using Microsoft.AspNetCore.Identity;
using System.ComponentModel.DataAnnotations;

namespace SageKing.OpenIddict.UI.Infrastructure.Data;

public interface ITenantEntity
{
    string TenantId { get; set; }
}

public abstract class TenantIdentityRole<TKey> : IdentityRole<TKey>, ITenantEntity
    where TKey : IEquatable<TKey>
{
    [MaxLength(64)]
    public virtual string? TenantId { get; set; }
}

public abstract class TenantIdentityUser<TKey> : IdentityUser<TKey>, ITenantEntity
  where TKey : IEquatable<TKey>
{
    [MaxLength(64)]
    public virtual string? TenantId { get; set; } 
}